<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="<s:url value='/resources/js/jquery/jquery-1.5.2.min.js'/>"></script> 
<style type="text/css">
	.content{
		width: 700px;
		height: 665px;
		padding-left: 33px;
	}
	table{
		width: 700px;
		border-collapse: collapse;
       	border: none;
       	line-height: 35px;
	}
	
    td{
        border: solid #E3E3E3 1px;
        text-align: center;
    }
	thead{
		background-color: #E7F1F2;
		font-size: 14px;
		color: #303030;
		font-weight: bold;
	}
	tbody{
		font-size: 14px;
		color: #303030;
	}
	
	.headText{
		font-size: 18px;
		color: #303030;
		border-bottom: 1px solid #E3E3E3;
		line-height: 45px;
    	margin-bottom: 15px;
    	font-weight: bold;
	}
	
	.sign {
	  bottom: 37px;
	  position: absolute;
	  right: 34px;
	  text-align: right;
	}
	
	.bt{
		
		border: 0 none;
		height: 31px;
		width: 100px;
		cursor: pointer;
	}
	
	.ok{
		background: url("<s:url value="/resources/images/shop/main/ok.png" />");
	}
	
	
	.grocolorca{
		width: 37px;
		height: 35px;
		float: left;
		margin-left: 22px;
		padding: 3px
	}
	.grocolor{
		width: 36px;
		height: 34px;
		cursor: pointer;
	}
	.checked{
		border: 1px solid;
	}
	
	.yellow{
		background-color: #DFC700;
	}
	
	.red{
		background-color: #FF0000;
	}
	
	.blue{
		background-color: #0076B3;
	}
	
	.greed{
		background-color: #0FA120;
	}
	
	.black{
		background-color: #000000;
	}
	input[type="radio"]{
		display: none;
	}
</style>
<script type="text/javascript">
	$(function(){
		//初始化颜色
		var colorMap=$(".colorMap");
		for(var i=0;i<colorMap.size();i++){
			var color=$(colorMap[i]).val();
			var id=$(colorMap[i]).attr("id");
			if(color!=null&&color!=""&&id!=null){
				$("#grocolor"+id).addClass(color);
			}
		}
		
		//选择
		$(".grocolor").click(function(){
			$(".grocolorca").removeClass("checked");
			$(this).parents(".grocolorca").addClass("checked");
			var planid=$(this).attr("id").substr(8);
			$("input#planid").val(planid);
		});
	});
</script>
</head>
<body>
<div class="content">

	<div class="headText">旅行团信息</div>
	<div>
		<s:iterator value="#request.colorMap">
			<input type="hidden" id="<s:property value="key"/>" class="colorMap"  value='<s:property value="value"/>' >
		</s:iterator>
	</div>
	<div >
		<table border="1px ">
			<thead>
				<tr>
					<td>颜色</td>
					<td>行程计划编号</td>
					<td>旅行社</td>
					<td>旅行团</td>
					<td>导游</td>
				</tr>
			</thead>
			<tbody>
				<s:iterator value="#request.shopList" status="shopList">
				<tr>
					<td>
						<s:if test="#shopList.isFirst()"> 
							<div class="grocolorca checked">
								<div id="grocolor<s:property value="planid" />" title=""  class="grocolor" style=""></div>
							</div>
						</s:if>
						<s:else>
							<div class="grocolorca">
								<div id="grocolor<s:property value="planid" />"  class="grocolor" style=""></div>
							</div>
						</s:else>
					</td>
					<td><s:property value="planid" /></td>
					<td><s:property value="agencyName" /></td>
					<td><s:property value="groupName" /></td>
					<td><s:property value="guideName" /></td>
				</tr>
				</s:iterator>
			</tbody>
		</table>
	</div>
	<div class="sign">
		<form id="signForm" action="<s:url value="/shop/intoAddGood.do" />">
			<input type="hidden" id="planid" name="guideSign.planid" value="<s:property value="#request.shopList[0].planid" />">
			<input type="hidden" name="guideSign.placeid" value="<s:property value="#request.shopList[0].placeid" />">
			<input type="hidden" name="guideSign.guideid" value="<s:property value="#request.shopList[0].guideid" />">
			<s:if test="#request.shopList.size()!=0">
			<input class="bt ok" type="submit" value="">
			</s:if>
		</form>
	</div>
</div>
</body>
</html>